/*
 * DistCommonConstant.java
 * Copyright 2021 Qunhe Tech, all rights reserved.
 * Qunhe PROPRIETARY/CONFIDENTIAL, any form of usage is subject to approval.
 */

package cn.org.itool.web.constent;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;

public class DistCommonConstant {

    /** 保存request的threadLocal*/
    public static final ThreadLocal<HttpServletRequest> requestTL = new ThreadLocal<HttpServletRequest>();

    public static final ThreadLocal<HttpServletResponse> responseTL = new ThreadLocal<HttpServletResponse>(); // 保存response的threadlocal


    public static final ThreadLocal<HttpSession> sessionTL = new ThreadLocal<HttpSession>(); // 保存session的threadlocal

    public static final ThreadLocal<Boolean> httpsProtocolTL = new ThreadLocal<Boolean>() {

        @Override
        protected Boolean initialValue() {
            return Boolean.FALSE;
        }
    };


    public static final ThreadLocal<String> account = new ThreadLocal<String>();//当前登陆账号id


    public static Integer YES = 1;

    public static Integer NO = 0;

}
